<?php

class errException extends Exception
{
	protected $oTpl;
	protected $oLang;
	
	public function __construct ($mMessage = null, $iCode = ERR_ERROR)
	{
		parent::__construct($mMessage, 100);
	}
	
	
	public function __toString ()
	{
		return $this->line;
	}
}

class warningException extends errException
{
	public function __construct ($mMessage = null)
	{
		parent::__construct($mMessage, ERR_WARNING);
	}
}

class fatalException extends errException
{
	public function __construct ($mMessage = null)
	{
		parent::__construct($mMessage, ERR_FATAL);
		die($this->__toString());
	}
}

class fileException extends errException
{
	public function __construct ($mMessage = null)
	{
		parent::__construct($mMessage, ERR_ERROR);
	}
}

class formException extends warningException
{
}

class dbException extends fatalException
{
	public function __construct ($mMessage = null)
	{
		
		if (!DEBUGGING && is_array($mMessage))
		{
			$mMessage[1] = $mMessage[2] = '';
		}
		if (DEBUGGING && $mMessage[0] == 'queryError')
		{
			$mMessage[0] = 'queryDebug';
		}
		
		parent::__construct("sdf");
	}
}

?>